from sbs_client import GameClient

#=======================================================================================================================
# MyBattleshipClient
#=======================================================================================================================
class MyBattleshipClient(GameClient):
    def __init__(self):
        GameClient.__init__(self)
    
    def enter_game(self, game_id, player_id):   
        self.send_synchronous_message_auto( "enter_game", game_id, player_id)
    
    def place_boat(self, game_id, player_id, length, x_coord, y_coord, orientation):
        return self.send_synchronous_message_auto( "place_boat", game_id, player_id, length, x_coord, y_coord, orientation)
                            
    def shoot(self, game_id, player_id, x_coord, y_coord):
        return self.send_synchronous_message_auto( "shoot", game_id, player_id, x_coord, y_coord ) 
    
    def get_state(self, game_id):
        return self.send_synchronous_message_auto( "get_state", game_id )
    
    def did_i_win(self, game_id, player_id):
        return self.send_synchronous_message_auto( "did_i_win", game_id, player_id )
    
    def win_loss_count(self, game_id, player_id):
        return self.send_synchronous_message_auto( "win_loss_count", game_id, player_id )
    
    def get_opponents_last_game_shots(self, game_id, player_id):
        return self.send_synchronous_message_auto( "get_opponents_last_game_shots", game_id, player_id )
    
    def get_opponents_last_game_placement(self, game_id, player_id):
        return self.send_synchronous_message_auto( "get_opponents_last_game_placement", game_id, player_id )
    
    def get_avg_shots_taken(self, game_id, player_id):
        return self.send_synchronous_message_auto( "get_avg_shots_taken", game_id, player_id )